﻿// -----------------------------------------------------------------------
// <copyright file="CompressorContract.cs">
// Copyright (c) 2013 Andrey Veselov. All rights reserved.
// License:  Microsoft Public License (MS-PL)
// Contacts: http://andrey.moveax.com  andrey@moveax.com
// </copyright>
// -----------------------------------------------------------------------

namespace PortableImagingLibrary.Png.Compressors
{
    using System.Diagnostics.Contracts;

    [ContractClassFor(typeof(ICompressor))]
    internal abstract class CompressorContract : ICompressor
    {
        public void AddLine(byte[] source)
        {
            Contract.Requires(source != null);
            Contract.Requires(source.Length > 0);
        }

        public byte[] GetChunkData()
        {
            Contract.Ensures(Contract.Result<byte[]>() != null);

            return default(byte[]);
        }

        #region IDisposable Members

        public abstract void Dispose();

        #endregion IDisposable Members
    }
}